package org.jeecg.modules.monitoring.j_monitoring.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.monitoring.j_monitoring.entity.GatewayWarningCount;
import org.jeecg.modules.monitoring.j_monitoring.entity.RingWarning;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 动环告警
 * @Author: xiaoyq
 * @Date:   2023-09-24
 * @Version: V1.0
 */
public interface RingWarningMapper extends BaseMapper<RingWarning> {

    /**
     * 清空所有日志记录
     */
    public void removeAll();

    /**
     * 插入动环告警
     * @param ringWarning
     * @return
     */
    int insertSelective(RingWarning ringWarning);

    /**
     * 查询所有告警列表
     * @return
     */
    List<RingWarning> selectAll();

    /**
     * 删除指定id动环告警
     * @param guid
     * @return
     */
    int deleteByGuid(@Param("guid") String guid);

    /**
     * 根据id查询动环告警统计数据
     * @param id
     * @return
     */
    GatewayWarningCount queryOneCount(@Param("id") String id);

    /**
     * 查询事件源关联的动环告警
     * @param eventSource
     * @return
     */
    List<RingWarning> selectByEventSource(@Param("eventSource") String eventSource);
}

